<script>
    function Hero(name, weapon){
        this.name = name
        this.weapon = weapon
    }

    let dpcq = new Hero('萧炎', '玄重尺')
    let xn = new Hero('王林', '万魂帆')

    Hero.prototype.greet = function(){
        console.log(`晚辈${this.name}`)
    }

    dpcq.greet()
    xn.greet()

    let arr = []
    let obj = [
        {name: '萧炎', weapon: '玄重尺'},
        {name:'王林', weapon:'万魂帆'}
    ]
    console.log(Array.isArray(arr));
    // console.log(Object.isObject(obj));

    console.log(Object.prototype.toString.call(obj) === '[object Array]');
    
    
    
</script>